package cn.nlsde.entity;

import cn.nlsde.common.BaseEntity;
import com.google.common.collect.ImmutableMap;
import lombok.Data;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * Created by zwj on 2016/10/6.
 */

@Data
public class EnterpriseEvaluation extends BaseEntity {


    private Integer templateId;

    private String templateName;

    private Set<Evaluation> evaluationList = new HashSet<>();

    public ImmutableMap<String, Evaluation> getImmutableEvaluateMap() {
        Map<String, Evaluation> maps = new HashMap<>();
        for (Evaluation evaluation : evaluationList) {
            maps.put(evaluation.getCategory(), evaluation);
        }
        return ImmutableMap.copyOf(maps);
    }
}
